Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always split switch expressions #1537

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Conversation

munificent
Copy link
Member

I figured that since other comma-delimited expression forms don't split
if they don't have to, switch expressions should be the same. But I
went and checked on a huge corpus and every single place where a switch
expression wasn't split was clearly much worse than splitting it would
be.

Fix #1529.

I figured that since other comma-delimited expression forms don't split
if they don't have to, switch expressions should be the same. But I
went and checked on a huge corpus and every single place where a switch
expression wasn't split was clearly much worse than splitting it would
be.

Fix #1529.
Copy link
Member

@kallentu kallentu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of this change also.
Thanks for doing it!

@munificent munificent merged commit 5749a94 into main Aug 19, 2024
7 checks passed
@munificent munificent deleted the always-split-switch-expressions branch August 19, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tall style: Never write expression switches in a single line
3 participants